package com.service.admin.base.controller;

import com.service.admin.base.controller.req.AnalysisReq;
import com.service.admin.base.service.AnalysisService;
import com.service.admin.framework.log.RequestLog;
import com.service.core.rest.BaseController;
import com.service.core.rest.response.BaseResponse;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 分析报表
 */

@RestController
@RequestMapping("analysis")
public class AnalysisController extends BaseController {


    @Autowired
    private AnalysisService analysisService;

    @RequestLog("查询用户资产")
    @PostMapping("/assets")
    public BaseResponse queryAccountAssets(@RequestBody AnalysisReq analysisReq){
        List assets = analysisService.queryCoinsAvailableData(analysisReq);
        return successQueryOneResponse(assets);
    }



    @RequestLog("统计资金数据")
    @PostMapping("/money")
    public BaseResponse queryMoneyInfo(@RequestBody AnalysisReq analysisReq){
        //TODO
        return successQueryOneResponse(null);
    }

}
